#!/bin/bash

# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
# sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
# sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
# yum clean all
# yum makecache

# dnf -y update
# dnf -y install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
# dnf -y install python3 python38 python3-devel
# ln -sf /usr/bin/pip3.8 /etc/alternatives/pip3
# ln -sf /usr/bin/pydoc3.8 /etc/alternatives/pydoc3
# ln -sf /usr/bin/python3.8 /etc/alternatives/python3
# yum -y install vim wget gzip tar
# yum -y install zlib-devel bzip2-devel pcre-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel
# yum -y install gcc*
# yum -y install vim wget gzip tar python3-devel


cd /opt

mkdir ~/.pip
cp pip.conf ~/.pip/
pip3 install --upgrade pip

# COPY requirements.txt requirements.txt
pip3 install -r /opt/requirements.txt

mkdir -p /opt/logs
mkdir -p /opt/statics/js
mkdir -p /opt/statics/css
mkdir -p /opt/statics/images
mkdir -p /opt/iClouds/pages
mkdir -p /opt/iClouds/templatetags

django-admin startproject iClouds
cd /opt/iClouds
django-admin startapp mysqldb
django-admin startapp Admin